/**
 * related to gridTypeDataGridCell.ui
 * 
 * @Author : chenglm
 * @Timestamp : 2016-10-11
 */
var homemakingUtil = require("url/homemaking");
var helperOpen = require("helper/open");
var root=ui("$");
var aLayout_type = ui("aLayout_type");
var imageView_img = ui("imageView_img");
var label_typeName = ui("label_typeName");

//设置数据绑定的映射关系
root.setMapping({
	"aLayout_type.tag":"parentId",
	"imageView_img.source":"smallImg",
	"imageView_img.tag":"fileDomain",
	"label_typeName.text":"name",
	"label_typeName.tag":"id"
});

root.on("dataRefreshed", function(){
});

aLayout_type.on("touch", function(data){
	if (aLayout_type.tag == homemakingUtil.typeId.JiaDianWeiXiu) {
		helperOpen.open("source://view/homemaking/detail/toOrder3.ui",{id:label_typeName.tag},"","pay_product_back");
	} else {
		helperOpen.open("source://view/homemaking/detail/detail.ui",{id:label_typeName.tag});
	}
});